<?
class controller_request{
	/*
		die url die werd aangeroepen
		@var	string
	*/
	private $url;
	/*
		controller module
		@var	string
	*/
	private $module;
	/*
		controller naam
		@var	string
	*/
	private $controller;
	/*
		action
		@var	string
	*/
	private $controllerAction;
	/*
		parameters die werden meegegeven
		@var	array
	*/
	private $params;
	/*
		methode van de de oproep POST of GET?
		@var	string
	*/
	private $requestMethod;
	
	/*
		instantie maken
	*/
	
	private $referer;
	
	public function __construct(){
	
		$this -> url = $_SERVER['REQUEST_URI'];
		
		$this -> params = array();
		$this -> requestMethod = $_SERVER['REQUEST_METHOD'];
		$this -> module = NULL;
	}

	public function getUrl(){
	
		return $this -> url;
	
	}
	
	public function getController(){
	
		return $this -> controller;
	
	}
	
	public function getModule(){
	
		return $this -> module;
	
	}
	
	public function getAction(){
		
		return $this -> controllerAction;
	
	}
	
	public function setModule($iModule){
		
	
		$this -> module = (string) $iModule;
		
	
	}
	
	public function setController($iController){
	
		$this -> controller = (string) $iController;
	
	}
	
	public function setControllerAction($iAction){
	
		$this -> controllerAction = (string) $iAction;
	
	}
	
	
	public function setParams(array $iParams){
	
		
	
		$this -> params = $iParams;
		
	
	}
	
	public function getParam($i){
	if(array_key_exists($i,$this -> params)){
		return $this -> params[$i];
	}else{
		return NULL;
	}
	
	}
	
	public function formatParam($i){
	
	if(array_key_exists($i,$this -> params)){
		return preg_replace('/-/',' ',$this -> params[$i]);
	}else{
		return NULL;
	}
	
	}


}


?>